package com.ztf.bean;

import java.io.Serializable;
import java.util.Objects;

public class User implements Serializable {
    private static final long serialVersionUID = -30426860556500475L;
    private String name;
    private byte[] head;
    private String identity; //身份 是客服,还是客户
    private  int maxServerPerson;// 最大接纳人数
    private long beReceived;

    public User(String name, byte[] head,String identity) {
        this.name = name;
        this.head = head;
        this.identity = identity;
    }

    public User() {
    }

    public User(String name, byte[] head, String identity, int maxServerPerson) {
        this.name = name;
        this.head = head;
        this.identity = identity;
        this.maxServerPerson = maxServerPerson;
    }

    public int getMaxServerPerson() {
        return maxServerPerson;
    }

    public long getBeReceived() {
        return beReceived;
    }

    public void setBeReceived(long beReceived) {
        this.beReceived = beReceived;
    }

    public void setMaxServerPerson(int maxServerPerson) {
        this.maxServerPerson = maxServerPerson;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public byte[] getHead() {
        return head;
    }

    public void setHead(byte[] head) {
        this.head = head;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(name, user.name) &&
                Objects.equals(identity, user.identity);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, identity);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", identity='" + identity + '\'' +
                '}';
    }
}
